
<?php ?>


<script>
    function showResult(str)
    {
        if (str.length == 0)
        {
            document.getElementById("livesearch").innerHTML = "";
            document.getElementById("livesearch").style.border = "0px";
            return;
        }
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp = new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        xmlhttp.onreadystatechange = function()
        {
            if (xmlhttp.readyState == 4 && xmlhttp.status == 200)
            {
                document.getElementById("livesearch").innerHTML = xmlhttp.responseText;
                document.getElementById("livesearch").style.border = "1px solid #A5ACB2";
            }
        }
        xmlhttp.open("GET", "index.php" + str, true);
        xmlhttp.send();
    }
</script>


<div class="menufindarea">
                <div id="TodayMatchs" class="menutodaysmatches menufindareaoff">
                    <p>
                        <a href="<?php echo FRONT_SITE_URL; ?>todaymatchs/profiletopmatchs/viewprofile" >Today’s Matches</a></p>
                    <div style="" class="bluestarburstmatches" id="todaysMatchesCountStarBurst">

                        <p><a href="<?php echo FRONT_SITE_URL; ?>todaymatchs/profiletopmatchs/viewprofile" class="color-white" id="todaysMatchesCount">5</a></p>

                    </div>
                </div>
                <div id="SearchTab" class="menusearch menufindareaoff color-main">
                    <p><a href="<?php echo FRONT_SITE_URL; ?>search">Search</a></p>
                </div>
                <div id="OnlineNowSearchTab" class="menusearch menufindareaon color-main">
                    

                    <p><a href="#">Online Now</a></p>
                </div>
                <div class="menuiminterested menufindareaoff">
                    <p>
                        <a href="#">I’m Interested</a></p>
                </div>
                <div id="SearchTabYUser" class="menusearch menufindareaoff color-main">
                    <p><a href="#" id="56">Username</a></p>
                </div>
                <div style="display: block;" class="showhidearrowup">
                    <a>Hide Options</a>
                    <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                </div>
                <div style="display: none" class="showhidearrowdown">
                    <a>Options</a>
                    <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                </div>
            </div>



<form action="" method="get" name="frmList" id="frmList">
    <div id="columnleft" >
        <div id="PopBlockNotification" style="display: none; background-color: yellow; font-size: 9pt; text-align: center; padding: 3px; margin-bottom: 4px;">
            <div style="width: 760px;">
                <table cellspacing="0" cellpadding="3" border="0" align="center">
                    <tbody><tr>
                            <td>
                                <img alt="!" src="<?php echo FRONT_SITE_URL ?>www/images/images1/imageupload/animatedexclamation.gif">
                            </td>
                            <td align="center">
                                Your popup blocker stopped you from chatting with a member. <a onclick="popNewICWindow();" href="javascript:void(0);">click here</a> to open the window<br>
                                <a href="">Click here</a> to learn how to disable your popup blocker on BBPeopleMeet.com
                            </td>
                            <td>
                                <img alt="!" src="<?php echo FRONT_SITE_URL ?>www/images/images1/imageupload/animatedexclamation.gif">
                            </td>
                        </tr>
                    </tbody></table>
            </div>
        </div>

        <div class="iminterestedarea" style="display: block;">
            <div class="searchcontent">
                <div style="display: none;" id="UsernameSearchParamsDiv" class="usersearchrow">
                    <div class="usersearchcol1">
                        <p>
                            Search for a Username:</p>
                        <input type="text" maxlength="16" id="UsernameSearchTextBox" name="">
                    </div>
                    <div class="usersearchcol2">
                        <div class="">
                            <div class="listpagelinksarea">
                                <div class="listpagelinksarea3 listpagelinksarea3off">
                                    <p>
                                        <a id="UsernameSearchSimilarMatchLink" href="javascript:;">Similar</a></p>
                                </div>
                                <div class="listpagelinksarea1 listpagelinksarea1on">
                                    <p>
                                        <a id="UsernameSearchExactMatchLink" href="javascript:;">Exact</a></p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div style="display: none;" class="usersearchcol3">
                        <div class="searchcol2top">
                            <input type="radio" id="UsernameGenderFemale" checked="" value="2" name="sexusername">
                            <p>
                                <label for="UsernameGenderFemale">
                                    Women</label></p>
                        </div>
                        <div class="searchcol2bottom">
                            <input type="radio" id="UsernameGenderMale" value="1" name="sexusername">
                            <p>
                                <label for="UsernameGenderMale">
                                    Men</label></p>
                        </div>
                    </div>
                    <div class="usersearchcol4">
                        <p>
                            <a id="UsernameSearchButton" title="Search" class="button_style buttonunavailable" href="javascript:void(0)">

                                Search</a></p>
                    </div>
                </div>
            </div>

            <div id="AdvancedSearchParamsDiv" class="searchparametersshow">
                <div style="display: none;" class="ziperrorplace">
                    <div class="ziperror">
                        <div class="ziperrorblock">
                            <p>
                                Please enter a valid zip code.</p>
                        </div>
                        <div class="redarrowdown">
                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/imageupload/redarrowdown.png">
                        </div>
                    </div>
                </div>
                <div class="searchparametersshow">
                    <div class="searchrow">
                        <div class="searchcol1">
                            <p>
                                I'm looking for:</p>
                        </div>
                        <div class="searchcol2">
                            <?php  ?>
                            Men
                        </div>
                        <div style="display: none;" class="searchcol2">
                            <div class="searchcol2top">
                                <input type="radio" id="GenderFemale" checked="checked" value="2" name="sex">
                                <p>
                                    <label for="GenderFemale">
                                        Women</label></p>
                            </div>
                            <div class="searchcol2bottom">
                                <input type="radio" id="GenderMale" value="1" name="sex">
                                <p>
                                    <label for="GenderMale">
                                        Men</label></p>
                            </div>
                        </div>
                        <div class="searchcol3">
                            <div class="searchbuttonrepeat">
                                <div style="display: none;" class="searchagesexpandedplace">
                                    <div class="searchagesexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchagesexpandedhide">
                                            <p data-property="age">who are 18 - 35</p>
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                        <div class="searchparameteroptionlast option1 searchageformitems">
                                            <p>
                                                who are</p>
                                            <input type="text" value="18" maxlength="3" name="MinAgeTextBox" id="MinAgeTextBox" class="border-color-alt">
                                            <p>
                                                -</p>
                                            <input type="text" value="35"  maxlength="3" name="MaxAgeTextBox" id="MaxAgeTextBox"  class="border-color-alt">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="searchages">
                                    <div class="searchparameter">
                                        <p data-property="age">who are 18 - 35</p>
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div style="display:inline;" id="SearchZip" class="searchbuttonrepeat">
                                <div style="display: none;" class="searchzipexpandedplace">
                                    <div class="searchzipexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchzipexpandedhide">
                                            <p data-property="ZipCode">near 00501</p>
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                        <div class="searchparameteroption option1 searchzipformitems">
                                            <p>
                                                near</p>
                                            <input type="text" value="00501" id="ZipTextBox" maxlength="9" name="ZipTextBox" class="border-color-alt">
                                            <p class="clearfix">
                                                &nbsp;</p>

                                        </div>

                                        <div class="searchparameteroptionlast option2">
                                            <p><a href="javascript:PeopleMedia.Search.ShowState();">Search by State</a></p>
                                            <p class="clearfix">&nbsp;
                                            </p>
                                        </div>

                                    </div>
                                </div>
                                <div class="searchzip">
                                    <div class="searchparameter">
                                        <p data-property="ZipCode">
                                            near 00501</p>
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>


                            <div style="display: none;" id="SearchCountry" class="searchbuttonrepeat">
                                <div style="display: none;" class="searchcountryexpandedplace">
                                    <div class="searchcountryexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchcountryexpandedhide">
                                            <p data-property="countryCode">
                                                in USA - New York</p>
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                        <div class="searchparameteroption option1 searchcountryformitems">
                                            <p>
                                                in</p><select name="Location" id="Location">

                                                <option value="">Entire Planet</option>
                                                <option value="">Entire Planet</option>
                                                <?php foreach ($countries as $countrie): ?>
                                                    <?php //dump($countrie->code); die; ?>
                                                    <option value="<?php echo $countrie->code; ?>"><?php echo $countrie->name; ?></option>
                                                <?php endforeach; ?>

                                            </select>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <div class="searchparameteroptionlast option2">
                                            <p><a href="javascript:PeopleMedia.Search.ShowZip();">search by zip code</a></p>
                                            <p class="clearfix">&nbsp;
                                            </p>
                                        </div>

                                    </div>
                                </div>
                                <div class="searchcountry">
                                    <div class="searchparameter">
                                        <p data-property="countryCode">
                                            in USA - New York</p>
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div class="searchbuttonrepeat">
                                <div style="display: none;" class="searchphotosexpandedplace">
                                    <div class="searchphotosexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchphotosexpandedhide">
                                            <p data-property="HasPhotos">have either</p>
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                        <div class="searchparameteroption option1 searchphotosformitems">
                                            <div class="photooptionsrepeat">
                                                <input type="radio" checked="" value="1" name="hasphotos" criteria-text="have photos" id="HasPhotosAny">
                                                <p>
                                                    <label for="HasPhotosAny">
                                                        either</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                        <div class="searchparameteroptionlast option2 searchphotosformitems">
                                            <div class="photooptionsrepeat">
                                                <input type="radio" value="2" name="hasphotos" criteria-text="have either" id="HasPhotosHasPhotos">
                                                <p>
                                                    <label for="HasPhotosHasPhotos">
                                                        photos</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="searchphotos">
                                    <div class="searchparameter">
                                        <p data-property="HasPhotos">have either</p>
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div class="searchcol4">
                                <p>
                                    <a title="Search" class="button_style" onclick="chooseMethod()" href="javascript:;">
                                        Search</a>
                                    <!--<input type="submit"  value="Search" style="padding:2px; background-color: #FA8100 !important; border-radius: 3px;color: #FFFFFF;text-shadow: 1px 1px 1px #333333;font-size: 18px;font-weight: bold;padding: 5px 10px;margin-top: -8px;">-->

                                    <!--<button onclick="">Click me</button> -->
                                    <!--<button id="multi-post" class="btn btn-info">Run Code</button>-->

                                </p>

                            </div>
                            <div class="search2ndrow">


                                <div criteria-selector="" class="searchbuttonrepeat">
                                    <div class="searchmoreexpandedplace">
                                        <div style="display: none;" class="searchmoreexpanded">
                                            <div class="searchparameterexpanded2 searchmoreexpandedhide searchparametersmaller2">
                                                <p>more</p>
                                                <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="height" class="searchparameteroption2">
                                                <p>
                                                    height</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="lookingfor" class="searchparameteroption2">
                                                <p>looking for</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="status" class="searchparameteroption2">
                                                <p>status</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="ethnicity" class="searchparameteroption2">
                                                <p>ethnicity</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="smoking" class="searchparameteroption2">
                                                <p>smoking</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="build" class="searchparameteroption2">
                                                <p>build</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="children" class="searchparameteroption2">
                                                <p>children</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="religion" class="searchparameteroption2">
                                                <p>religion</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <div style="" criteria-type="zodiac" class="searchparameteroptionlast2">
                                                <p>zodiac</p>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="searchmore">
                                        <div class="searchparameter2 searchparametersmaller2">
                                            <p>more</p>
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <p class="clearfix">
                                &nbsp;</p>
                        </div>
                        <div style="display: none;" id="hiddenSearch">
                            <div criteria-for="height" class="searchbuttonrepeat">
                                <div style="display: none;" class="searchheightexpandedplace">
                                    <div class="searchheightexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchheightexpandedhide searchparametersmaller">
                                            <p criteria-display="height">height: 4' 0" - 7' 11"</p>
                                            <img hide-criteria="height" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                        <div class="searchparameteroptionlast option1 searchheightformitems">
                                            <select name="MinHeight" id="MinHeight"><option value="0" selected="selected">4.0</option>

                                                <?php foreach (Constant::getTallArray() as $key => $value): ?>
                                                    <option value="<?php echo round($key * 30.48, 0) ?>"><?php echo $key; ?></option>

                                                <?php endforeach; ?>
                                            </select>
                                            <p>
                                            </p>
                                            <select name="MaxHeight" id="MaxHeight"><option value="152">4.0</option>

                                                <?php foreach (Constant::getTallArray() as $key1 => $value1): ?>
                                                    <option value="<?php echo round($key * 30.48, 0); ?>"><?php echo $key1; ?></option>

                                                <?php endforeach; ?>

                                                <option value="245">8.0</option>
                                            </select>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>
                                    </div>
                                </div>
                                <div class="searchheight">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="height">height: 4' 0" - 7' 11"</p>
                                        <img hide-criteria="height" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="lookingfor" class="searchbuttonrepeat">
                                <div class="searchlookingforexpandedplace">
                                    <div class="searchlookingforexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchlookingforexpandedhide searchparametersmaller">
                                            <p criteria-display="lookingfor">looking for</p>
                                            <img hide-criteria="lookingfor" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <!--<div class="searchparameteroptionlast searchlookingforformitems">
                                               <div class="photooptionsrepeat">
                                                   <input type="checkbox" criteria-text="pen pal" value="0" name="lookingfor[]" id="">
                                                   <p>
                                                       <label for="lookingforCheckbox64">any</label></p>
                                               </div>
                                               <p class="clearfix">
                                                   &nbsp;</p>
                                           </div>-->

                                        <?php
                                        foreach (Constant::getLookingForArray() as $key => $value):
                                            ?>

                                            <div class="searchparameteroptionlast searchlookingforformitems">
                                                <div class="photooptionsrepeat">
                                                    <input type="checkbox" criteria-text="pen pal" value="<?php echo $key; ?>" name="lookingfor[]" id="">
                                                    <p>
                                                        <label for="lookingforCheckbox64"><?php echo $value; ?></label></p>
                                                </div>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                        <?php endforeach; ?>



                                    </div>
                                </div>
                                <div class="searchlookingfor">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="lookingfor">looking for</p>
                                        <img hide-criteria="lookingfor" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="status" class="searchbuttonrepeat">
                                <div class="searchstatusexpandedplace">
                                    <div class="searchstatusexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchstatusexpandedhide searchparametersmaller">
                                            <p criteria-display="status">status</p>
                                            <img hide-criteria="status" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <?php foreach (Constant::getMaritalArray() as $key => $value): ?>
                                            <?php $i = 0; ?>
                                            <div class="searchparameteroptionlast searchlookingforformitems">
                                                <div class="photooptionsrepeat">
                                                    <input type="checkbox" criteria-text="widowed" value="<?php echo $key; ?>" name="status[]" id="">
                                                    <p>
                                                        <label for="statusCheckbox4"><?php echo $value; ?></label></p>
                                                </div>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                            <?php $i = $i + 1; ?>
                                        <?php endforeach; ?>

                                    </div>
                                </div>
                                <div class="searchstatus">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="status">status</p>
                                        <img hide-criteria="status" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="ethnicity" class="searchbuttonrepeat">
                                <div class="searchethnicityexpandedplace">
                                    <div class="searchethnicityexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchethnicityexpandedhide searchparametersmaller">
                                            <p criteria-display="ethnicity">ethnicity</p>
                                            <img hide-criteria="ethnicity" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>


                                        <div class="searchparameteroption searchlookingforformitems">
                                            <div class="photooptionsrepeat">
                                                <input id = "txtethnicity" type="checkbox" criteria-text="native american" value="-1" name="txtethnicity[]" data-input="ethnicity" >

                                                <p>
                                                    <label for="ethnicityCheckbox8">any</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <?php
                                        foreach (Constant::getEthnicityArray() as $key => $value):
                                            ?>
                                            <div class="searchparameteroption searchlookingforformitems">
                                                <div class="photooptionsrepeat">
                                                    <input id="txtethnicity" type="checkbox" criteria-text="native american" value="<?php echo $key; ?>" name="txtethnicity[]" data-input="ethnicity" >

                                                    <p>
                                                        <label for="ethnicityCheckbox8"><?php echo $value; ?></label></p>
                                                </div>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>

                                        <?php endforeach ?>  


                                    </div>
                                </div>
                                <div class="searchethnicity">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="ethnicity">ethnicity</p>
                                        <img hide-criteria="ethnicity" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="smoking" class="searchbuttonrepeat">
                                <div class="searchsmokingexpandedplace">
                                    <div class="searchsmokingexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchsmokingexpandedhide searchparametersmaller">
                                            <p criteria-display="smoking">smoking</p>
                                            <img hide-criteria="smoking" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <div class="searchparameteroptionlast searchlookingforformitems">
                                            <div class="photooptionsrepeat">
                                                <input id="lookingfor" type="checkbox" criteria-text="daily smoker" value="0" name="lookingfor[]" checked="checked">
                                                <p>
                                                    <label for="smokingCheckbox3">any</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <?php
                                        foreach (Constant::getSmokerArray() as $key => $value):
                                            ?>

                                            <div class="searchparameteroptionlast searchlookingforformitems">
                                                <div class="photooptionsrepeat">
                                                    <input type="checkbox" criteria-text="daily smoker" value="<?php echo $key; ?>" name="smokeing[]" >
                                                    <p>
                                                        <label for="smokingCheckbox3"><?php echo $value; ?></label></p>
                                                </div>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>

                                        <?php endforeach; ?>
                                    </div>
                                </div>
                                <div class="searchsmoking">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="smoking">smoking</p>
                                        <img hide-criteria="smoking" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="build" class="searchbuttonrepeat">
                                <div class="searchbuildexpandedplace">
                                    <div class="searchbuildexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchbuildexpandedhide searchparametersmaller">
                                            <p criteria-display="build">build</p>
                                            <img hide-criteria="build" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                    </div>
                                </div>
                                <div class="searchbuild">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="build">build</p>
                                        <img hide-criteria="build" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="children" class="searchbuttonrepeat">
                                <div class="searchchildrenexpandedplace">
                                    <div class="searchchildrenexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchchildrenexpandedhide searchparametersmaller">
                                            <p criteria-display="children">children</p>
                                            <img hide-criteria="children" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>


                                        <div class="searchparameteroption searchlookingforformitems">
                                            <div class="photooptionsrepeat">
                                                <input type="checkbox" criteria-text="any" checked="checked" value="0" name="children[]">
                                                <p>
                                                    <label for="childrenCheckbox-1">any</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>


                                        <div class="searchparameteroption searchlookingforformitems">
                                            <div class="photooptionsrepeat">
                                                <input type="checkbox" value="1" name="children" >
                                                <p>
                                                    <label for="childrenCheckbox-1">no</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <div class="searchparameteroption searchlookingforformitems">
                                            <div class="photooptionsrepeat">
                                                <input type="checkbox"  value="2" name="children[]">
                                                <p>
                                                    <label for="childrenCheckbox-1">yes</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>


                                    </div>
                                </div>
                                <div class="searchchildren">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="children">children</p>
                                        <img hide-criteria="children" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="religion" class="searchbuttonrepeat">
                                <div class="searchreligionexpandedplace">
                                    <div class="searchreligionexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchreligionexpandedhide searchparametersmaller">
                                            <p criteria-display="religion">religion</p>
                                            <img hide-criteria="religion" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>


                                        <!-- religion-->

                                        <div class="searchparameteroption searchlookingforformitems">
                                            <div class="photooptionsrepeat">
                                                <input type="checkbox" criteria-text="any" checked="checked" value="0" name="txtreligion[]" data-input="">
                                                <p>
                                                    <label for="religionCheckbox-1">any</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <?php
                                        foreach (Constant::getReligionArray() as $key => $value):
                                            $i = 0;
                                            ?>

                                            <div class="searchparameteroption searchlookingforformitems">
                                                <div class="photooptionsrepeat">
                                                    <input type="checkbox" criteria-text="any" value="<?php echo $key; ?>" name="txtreligion[]" data-input="">
                                                    <p>
                                                        <label for="religionCheckbox-1"><?php echo $value; ?></label></p>
                                                </div>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                        <?php endforeach; ?>
                                        <!-- religion -->


                                    </div>
                                </div>
                                <div class="searchreligion">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="religion">religion</p>
                                        <img hide-criteria="religion" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                            <div criteria-for="zodiac" class="searchbuttonrepeat">
                                <div class="searchzodiacexpandedplace">
                                    <div class="searchzodiacexpanded" style="display: none;">
                                        <div class="searchparameterexpanded searchzodiacexpandedhide searchparametersmaller">
                                            <p criteria-display="zodiac">zodiac</p>
                                            <img hide-criteria="zodiac" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                            <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <!-- zodiace -->

                                        <div class="searchparameteroption searchlookingforformitems">
                                            <div class="photooptionsrepeat">
                                                <input type="checkbox" checked="" value="0" name="txtzodiac">
                                                <p>
                                                    <label for="zodiacCheckbox-1">any</label></p>
                                            </div>
                                            <p class="clearfix">
                                                &nbsp;</p>
                                        </div>

                                        <?php
                                        foreach (Constant::getZodiacArray() as $key => $value):
                                            ?>

                                            <div class="searchparameteroption searchlookingforformitems">
                                                <div class="photooptionsrepeat">
                                                    <input type="checkbox" value="<?php echo $key; ?>" name="txtzodiac[]" >
                                                    <p>
                                                        <label for="zodiacCheckbox-1"><?php echo $value; ?></label></p>
                                                </div>
                                                <p class="clearfix">
                                                    &nbsp;</p>
                                            </div>
                                        <?php endforeach; ?>
                                        <!-- zodiace -->

                                    </div>
                                </div>
                                <div class="searchzodiac">
                                    <div class="searchparameter searchparametersmaller">
                                        <p criteria-display="zodiac">zodiac</p>
                                        <img hide-criteria="zodiac" class="hidebuttonfix" src="<?php echo FRONT_SITE_URL ?>www/images/images1/hidebutton.png">
                                        <img src="<?php echo FRONT_SITE_URL ?>www/images/images1/arrowup.png">
                                        <p class="clearfix">
                                            &nbsp;</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div style="display: none;" id="SearchResultsContainer">
            </div>
        </div>
        <div id="LoadingResultsDiv" class="resultsloadingoverlay" style="display: none;">
            <div class="resultsloading bgcolor-main">
                <h1>
                    Loading your search results...</h1>
                <div class="loadinggraphic">
                    <img alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/upgrade/waitwheel.gif">
                </div>
                <p class="clearfix">
                    &nbsp;</p>
            </div>
        </div>

        <script>

            $jq(document).ready(function() {
                //PeopPeopleMedialeMedia.Search.defaultMinAge = 18;
                //PeopleMedia.Search.defaultMaxAge = 35;
                //PeopleMedia.Search.currentPage = 1;
                //PeopleMedia.Search.sortCol = 'MyDefault';
                //PeopleMedia.Search.viewGallery = false;
                //PeopleMedia.Search.searchBy = 1;
                PeopleMedia.Search.init();

            });
        </script>

        <script>

            (function($jq) {
                $jq(".ui-autocomplete-input").on("autocompleteopen", function() {
                    var autocomplete = $jq(this).data("autocomplete"),
                            menu = autocomplete.menu;

                    if (!autocomplete.options.selectFirst) {
                        return;
                    }

                    $jq('.ui-autocomplete').css('z-index', '993');

                    menu.activate($jq.Event({type: "mouseenter"}), menu.element.children().first());
                });
            }(jQuery));

            $jq(document).ready(function() {

                var locationCSS = {'width': '150px', 'font-size': '.89em'};
                PeopleMedia.CreateComboBox('Location', 'USA - New York', locationCSS);

            });
        </script>

    </div>

</form>
<div id="loadingImg" class="resultsloadingoverlay" style="display: none;">
    <div class="resultsloading bgcolor-main">
        <h1>
            Loading your search results...</h1>
        <div class="loadinggraphic">
            <img alt="" src="<?php echo FRONT_SITE_URL ?>www/images/images1/waitwheel.gif">
        </div>
        <p class="clearfix">
            &nbsp;</p>
    </div>
</div>

<div id="mydemo" style="">






    


</div>

<script>


    $(document).ready(function() {
        
        ajaxSearch(FRONT_SITE_URL + 'search/default/resultSearch?act=search&' + $('#frmList').serialize());
        $('#DisplayGalleryLink').click(function() {
           // alert('asfafafa');
           // ajaxGallery($(this).attr('href'));
           //window.location.assign("http://www.w3schools.com")
           
            event.stopPropagation();
            return false;
            
            /// ajaxSearch(FRONT_SITE_URL + 'search/default/resultSearch?act=search&' + $('#frmList').serialize());
        });
        //loadGallery();
        //loadEvent();
    });
    function chooseMethod() {

        $('#mydemo').show();
        var ids = new Array();
        $(".searchethnicityexpanded input").each(function(index) {

            ids.push($(this).val());

        });
        ajaxSearch(FRONT_SITE_URL + 'search/default/resultSearch?act=search&' + $('#frmList').serialize());


    }

    function ajaxSearch(url) {
        $('#loadingImg').show();
        
        // khong dung thang nay
        $.ajax({
            url: url,
            type: 'POST',
            error: function() {
               // alert('error');
                $('#loadingImg').hide();
            },
            success: function(data) {
                $('#loadingImg').hide();
                
                

                var idx = data.indexOf('@@done@@');
                if ($('#searchsortby').val() == 1 || $('#searchsortby').val() == 2) {
                    alert('Choose district please!!');

                    $('#mydemo').html(data);

                }

                $('#mydemo').html(data);
                $('#DisplayGalleryLink').click(function() {
                    ajaxSearch(FRONT_SITE_URL + 'search/default/gallerySearch?act=search&' + $('#frmList').serialize());
                    $('#mydemo').html(data);
                    return false;
                });
                
                 $('#DisplayListLink').click(function() {
                    ajaxSearch(FRONT_SITE_URL + 'search/default/resultSearch?act=search&' + $('#frmList').serialize());
                    $('#mydemo').html(data);
                    return false;
                });
                
                $('#OnlineNowSearchTab a').click(function() {
                    //alert('bv m,,dmf ');
                    $(this).parent().parent().removeClass('menufindareaoff');
                    $(this).parent().parent().addClass('menufindareaon');
                    $('#SearchTab').removeClass('menufindareaon');
                    $('#SearchTab').addClass('menufindareaoff');
                    $('#TodayMatchs').removeClass('menufindareaon');
                    $('#TodayMatchs').addClass('menufindareaoff');
                    ajaxSearch(FRONT_SITE_URL + 'search/default/onlineSearch?act=search&' + $('#frmList').serialize());
                    $('#mydemo').html(data);
                    return false;
                });
                
                 $('#SearchTabYUser a').click(function() {
                     $('.iminterestedarea').css('display','none');
                    $(this).parent().parent().removeClass('menufindareaoff');
                    $(this).parent().parent().addClass('menufindareaon');
                     $('#SearchTab').removeClass('menufindareaon');
                    $('#SearchTab').addClass('menufindareaoff');
                    ajaxSearch(FRONT_SITE_URL + 'search/default/searchuser?act=search&' + $('#frmList').serialize());
                    $('#mydemo').html(data);
                    return false;
                });
                
                /*$('.menutodaysmatches a').click(function() {
                    //alert('fdsvojfdjn');
                    $('.iminterestedarea').css('display','none');
                   // document.getElementById("p2").style.color="blue";
                    //$('.iminterestedarea').css('display','block');
                    $(this).parent().parent().removeClass('menufindareaoff');
                    $(this).parent().parent().addClass('menufindareaon');
                     $('#SearchTab').removeClass('menufindareaon');
                    $('#SearchTab').addClass('menufindareaoff');
                    $('#OnlineNowSearchTab').removeClass('menufindareaon');
                    $('#OnlineNowSearchTab').addClass('menufindareaoff');
                    ajaxSearch(FRONT_SITE_URL + 'search/profiletopmatchs/viewprofile');
                    $('#mydemo').html(data);
                    return false;
                });*/
                
            }

        });
    }

    function loadEvent() {
        //$('#loadingImg').css('display', 'block');/// dj ay
        $('.yiiPager a').click(function(event) {
            ajaxSearch($(this).attr('href'));
            event.stopPropagation();
            return false;
        });
    }


</script>